<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport"
    content="width=device-width, initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
  <title>Document</title>
  <style>

  </style>
</head>

<body>
  <script src="./axios.js"></script>

</body>
<script>
  // 指定请求参数
  axios({
    // method: 'GET', // 默认就是GET
    url: 'http://www.itcbc.com:3006/api/getbooks',
    params: {
      id: 17, // 表示只获取id=17的数据
      bookname: '三国'
    }
  }).then(({ data: res }) => {
    console.log(res)
  })
</script>

</html>